﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Watchdog
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "WireService" in both code and config file together.
    public class WireService : IWireService
    {

        //public EventHandler OnReport;
        //public EventHandler OnBurglarCome;

        public void SendReport(String pActivityName)
        {
            //if (OnReport!=null)
            //    OnReport(pActivityName,null);
            Watchdog.ActivityName = pActivityName;
        }
        
        public void IdentifyBurglar(String pName)
        {
            //if (OnBurglarCome != null)
            //    OnBurglarCome(pName, null);
            Watchdog.SetBurglarName(pName);
        }

        public void BurglarLeft()
        {
            Watchdog.SetBurglarName(null);
            //if (OnBurglarCome != null)
            //    OnBurglarCome(null, null);
        }
    }
}
